Skip to content

⚑ Bolt: πŸ”’ Enhance broken clients handling using XClassHint - #17

Open
CasperGamingOne wants to merge 1 commit into
my_dwmfrom
jules-1656892195765575263-85bd0b51
Open

⚑ Bolt: πŸ”’ Enhance broken clients handling using XClassHint#17
CasperGamingOne wants to merge 1 commit into
my_dwmfrom
jules-1656892195765575263-85bd0b51

Conversation

@CasperGamingOne

Copy link
Copy Markdown
Owner

What: Update dwm handling of "broken" clients (windows without valid titles) by first falling back to their XClassHint res_class or res_name before resorting to the hardcoded "broken" label.

Why/Risk: When applications failed to provide WM_NAME or _NET_WM_NAME correctly, their window title was forcefully set to "broken". When a user had multiple misbehaving windows open, they all appeared identically labeled in the UI, ruining user experience.

Solution: Modified updatetitle() in dwm.c. Now, if the title is empty (0), dwm invokes XGetClassHint() to extract the application underlying class (res_class) or instance name (res_name). These values accurately describe the misbehaving application in most cases. A memory leak check utilizing XFree ensures proper memory disposal from X11 allocations. If both XClassHints fail to provide a title, the function safely falls back to the original "broken" label.

Impact: Dramatically improves user experience for standard setups; users will now see meaningful names (like "Firefox") instead of "broken" for clients missing title properties. Ensures no runtime memory leak regressions via correct cleanup procedures.

Measurement: Compiles successfully and verified proper logic functionality and fallback edge cases.


PR created automatically by Jules for task 1656892195765575263 started by @CasperGamingOne

**What:** Update dwm handling of "broken" clients (windows without valid titles) by first falling back to their XClassHint res_class or res_name before resorting to the hardcoded "broken" label.

**Why/Risk:** When applications failed to provide WM_NAME or _NET_WM_NAME correctly, their window title was forcefully set to "broken". When a user had multiple misbehaving windows open, they all appeared identically labeled in the UI, ruining user experience.

**Solution:** Modified updatetitle() in dwm.c. Now, if the title is empty (0), dwm invokes XGetClassHint() to extract the application underlying class (res_class) or instance name (res_name). These values accurately describe the misbehaving application in most cases. A memory leak check utilizing XFree ensures proper memory disposal from X11 allocations. If both XClassHints fail to provide a title, the function safely falls back to the original "broken" label.

**Impact:** Dramatically improves user experience for standard setups; users will now see meaningful names (like "Firefox") instead of "broken" for clients missing title properties. Ensures no runtime memory leak regressions via correct cleanup procedures.

**Measurement:** Compiles successfully and verified proper logic functionality and fallback edge cases.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

πŸ‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a πŸ‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions

Copy link
Copy Markdown

This PR has been inactive for 5 days and has been marked as stale. It will remain open indefinitely, but please provide an update if you intend to continue working on it.

@github-actions github-actions Bot added the stale label Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant